﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 修改人：郭文博
 * 时间：2025-06-26
 * 修改说明：获取要删除的地址的接口
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using seejee_Backendium.Core.Interfaces;
using seejee_Backendium.Core.Models;
using seejee_Backendium.Data.DbContest;

namespace seejee_Backendium.Data.Services
{
    public class ApkService:IApkService
    {
        private readonly ApplicationDbContext _context;
        private readonly ILogger<MenuService> _logger;
        public ApkService(ApplicationDbContext context, ILogger<MenuService> logger)
        {
            _context = context;
            _logger = logger;
        }
        public async Task<String> GetPassByUserNameAsync(int id)
        {

            var userApp = await _context.userApps
                .AsNoTracking()
                .Where(app => app.id == id)
                .Select(app => app.appAddress)
                .FirstOrDefaultAsync();

            return userApp ?? string.Empty; // 返回空字符串而不是null
        }
    }
}
